home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
15
/
marylamb.zip
/
LIBAUX.ASM
next >
Wrap
Assembly Source File
|
1986-03-06
|
2KB
|
143 lines
;-------------------------------------------------------
;
; Windows start up module
;
if1
?WINLIBC = 0
?PASCAL = 0
ifndef ?PASLIBW
ifndef ?MLIBW
ifndef ?SLIBW
?WINLIBC = 1
ifndef ?MLIB
memS = 1
%out ! Compiling for WINLIBC.LIB
else
memM = 1
%out ! Compiling for MWINLIBC.LIB/LWINLIBC.LIB
endif
else
memS = 1
%out ! Compiling for SLIBW.LIB
endif
else
memM = 1
%out ! Compiling for MLIBW.LIB/LLIBW.LIB
endif
else
?PASCAL = 1
memM = 1
%out ! Compiling for PASLIBW.LIB
endif
ifndef ?OEMLIBC
?LIBOEM = 0
else
?LIBOEM = 1
%out ! Compiling for OEMLIBC.LIB
endif
endif
.xlist
?PLM = 1;
?WIN = 1;
include cmacros.inc
.list
sBegin DATA
assumes DS,DATA
public __acrtused
__acrtused = 1
if SizeC
globalCP __aaltstkovr,-1 ;
endif
sEnd DATA
externFP <FATALEXIT>
sBegin CODE
assumes CS,CODE
PUBLIC __chkstk,_chkstk,chkstk
__chkstk:
_chkstk:
chkstk:
pop bx
if sizeC
pop dx
endif
sub ax,sp
neg ax
chkstk1:
mov sp,ax
if sizeC
push dx
push bx
ccc proc far
ret
ccc endp
else
jmp bx
endif
labelNP <PUBLIC,__astkovr>
mov al,-1
db 0BBh
labelNP <PUBLIC,__cintDIV>
mov al,-2
db 0BBh
labelNP <PUBLIC,__fptrap>
mov al,-3
cbw
cCall FATALEXIT,<ax>
sEnd CODE
ife ?WINLIBC
externFP <main>
sBegin CODE
assumes CS,CODE
cProc __astart,<PUBLIC,FAR>
cBegin
;;
;; DS = automatic data segment.
;; CX = size of heap.
;; DI = module handle.
;; ES:SI = address of command line (not used).
;;
push es
push si
push di
push cx
push ds
mov si,sp
mov ax,5
regptr argv,ss,si ; SS != DS.
;;cCall __cinit ; Not called because all "C" librarys
; assume ss == ds.
;
; main( argc, argv )
;
cCall main,<ax,argv>
add sp,10 ; Pop parameters to __astart.
cEND __astart
sEnd CODE
end __astart
endif ; ife ?WINLIBC
end ENTRY